﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hallenberg.SmartClient.Interfaces;

namespace Hallenberg.SmartClient.Test.TestObject
{
    class BaseModuleHandlerExtender : IClassTypeHandlerExtender
    {
        public static bool HandlerHasExecuted { get; private set; }

        static BaseModuleHandlerExtender()
        {
            BaseModuleHandlerExtender.HandlerHasExecuted = false;
        }

        public bool CanHandle(Type type)
        {
            return type.IsSubclassOf(typeof(BaseModule));
        }

        public Type HandledBaseType
        {
            get { return typeof(BaseModule); }
        }

        public bool Handle(Type type)
        {
            BaseModuleHandlerExtender.HandlerHasExecuted = true;
            return true;
        }
    }
}
